﻿namespace GoodAdmin.System;

/// <summary>
/// 系统配置服务
/// </summary>
public interface IConfigService
{   
    /// <summary>
    /// 添加配置
    /// </summary>
    /// <param name="input"></param>
    /// <returns></returns>
    Task AddConfig(ConfigAddInput input);
    /// <summary>
    /// 修改配置
    /// </summary>
    /// <param name="input"></param>
    /// <returns></returns>
    Task UpdateConfig(ConfigUpdateInput input);
    /// <summary>
    /// 删除配置
    /// </summary>
    /// <param name="input"></param>
    /// <returns></returns>
    Task DeleteConfig(BaseIdInput input);

    /// <summary>
    /// 分页查询配置信息列表
    /// </summary>
    /// <param name="input"></param>
    /// <returns></returns>
    Task<SqlSugarPagedList<SysConfig>> GetConfigPageList(ConfigPageInput input);

    /// <summary>
    /// 根据指定分类和key值查询配置
    /// </summary>
    /// <param name="Category"></param>
    /// <param name="configKey"></param>
    /// <returns></returns>
    Task<SimpleConfig> GetConfigInfo(string Category, string configKey);

    /// <summary>
    /// 根据分类查询配置信息列表
    /// </summary>
    /// <param name="Category"></param>
    /// <returns></returns>
    Task<List<SimpleConfig>> GetConfigListByCategory(string Category);

    /// <summary>
    /// 获取系统配置信息
    /// </summary>
    /// <param name="Category"></param>
    /// <returns></returns>
    Task<ConfigOutput> GetSystemConfig();

    /// <summary>
    /// 更新系统配置
    /// </summary>
    /// <param name="input"></param>
    /// <returns></returns>
    Task UpdateSystemConfig(SystemConfigUpdateInput input);


}
